<if condition="$common_hide_header"> <else /> <!DOCTYPE html>
<html lang="en">
<head>
<title>{$page_title} - {:C('defaultinfo.name')}</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="Thu, 19 Nov 1900 08:52:00 GMT">
<link rel="shortcut icon" href="__PUBLIC__/ico/favicon.ico">
<link rel="apple-touch-icon" href="__PUBLIC__/ico/favicon.png">
<link rel="apple-touch-icon" sizes="72x72"
	href="__PUBLIC__/ico/favicon-72x72.png">
<link rel="apple-touch-icon" sizes="114x114"
	href="__PUBLIC__/ico/favicon-114x114.png">

<!-- <link type="text/css" rel="stylesheet"
          href="__PUBLIC__/vendors/jquery-ui-1.10.3.custom/jquery-ui-1.10.3.full.min.css"> -->
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/font-awesome/css/font-awesome.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap/css/bootstrap.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap/css/bootstrap.css">

<!--LOADING STYLESHEET FOR PAGE-->
<!--Loading style vendors-->
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/animate.css/animate.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jquery-pace/pace.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/iCheck/skins/all.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jquery-notific8/jquery.notific8.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap-daterangepicker/daterangepicker-bs3.css">
<!--Loading style-->
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/css/themes/style1/pink-blue.css" class="default-style">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/css/themes/style1/<?php echo cookie('user_color')?cookie('user_color'):'orange-blue';?>.css"
	id="theme-change" class="style-change color-change">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jquery-toastr/toastr.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap-table/src/bootstrap-table.css">
<link rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap3-editable/css/bootstrap-editable.css">
<link rel="stylesheet" href="__PUBLIC__/vendors/dragtable/dragtable.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jqgrid/ui.jqgrid.css?0820" rel="stylesheet">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/sweetalert/sweetalert.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/mCustomScrollbar/jquery.mCustomScrollbar.css">

<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/css/themes/style1/nanyou.css" class="default-style">

<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jquery-nestable/nestable.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/select2/select2-madmin.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap-select/bootstrap-select.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/multi-select/css/multi-select-madmin.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/clockpicker/clockpicker.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/treeview/jquery.treeview.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap-progressbar/css/bootstrap-progressbar-3.1.1.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/bootstrap-switch/css/bootstrap-switch.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jquery-tablesorter/themes/blue/style-custom.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/css/nocpanel.css">

<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/calendar/zabuto_calendar.min.css">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/css/style-responsive.css">
<if condition="$datepicker eq 'jquery'">
<link type="text/css" rel="stylesheet"
	href="__PUBLIC__/vendors/jplist/html/css/vendor/jquery-ui.css">
</if>
<script src="__PUBLIC__/js/jquery-1.10.2.min.js"></script>
<script src="__PUBLIC__/js/jquery-migrate-1.2.1.min.js"></script>
<script src="__PUBLIC__/js/jquery-ui.js"></script>
<!--loading bootstrap js-->

<script src="__PUBLIC__/vendors/bootstrap/js/bootstrap.min.js"></script>
<script
	src="__PUBLIC__/vendors/bootstrap-hover-dropdown/bootstrap-hover-dropdown.js"></script>
<script src="__PUBLIC__/js/html5shiv.js"></script>
<script src="__PUBLIC__/js/respond.min.js"></script>
<script src="__PUBLIC__/vendors/metisMenu/jquery.metisMenu.js"></script>
<script src="__PUBLIC__/vendors/slimScroll/jquery.slimscroll.js"></script>
<script src="__PUBLIC__/vendors/jquery-cookie/jquery.cookie.js"></script>
<script src="__PUBLIC__/vendors/iCheck/icheck.min.js"></script>
<script src="__PUBLIC__/vendors/iCheck/custom.min.js"></script>
<script src="__PUBLIC__/vendors/jquery-notific8/jquery.notific8.min.js"></script>
<script src="__PUBLIC__/vendors/jquery-highcharts/highcharts.js"></script>
<script src="__PUBLIC__/js/jquery.menu.js"></script>
<script src="__PUBLIC__/vendors/jquery-pace/pace.min.js"></script>
<script src="__PUBLIC__/vendors/holder/holder.js"></script>
<script src="__PUBLIC__/vendors/responsive-tabs/responsive-tabs.js"></script>
<script
	src="__PUBLIC__/vendors/jquery-news-ticker/jquery.newsTicker.min.js"></script>
<script src="__PUBLIC__/vendors/moment/moment.js"></script>
<if condition="$datepicker neq 'jquery'"> <script
	src="__PUBLIC__/vendors/bootstrap-datepicker/js/bootstrap-datepicker.js"></script>
</if>
<script
	src="__PUBLIC__/vendors/bootstrap-daterangepicker/daterangepicker.js"></script>
<script src="__PUBLIC__/vendors/jquery-validate/jquery.validate.min.js"></script>
<script src="__PUBLIC__/js/form-validation.js"></script>
<script src="__PUBLIC__/vendors/jquery-toastr/toastr.min.js"></script>
<script src="__PUBLIC__/vendors/layer/layer.min.js"></script>
<script src="__PUBLIC__/vendors/sweetalert/sweetalert.min.js"></script>
<script
	src="__PUBLIC__/vendors/mCustomScrollbar/jquery.mousewheel.min.js"></script>
<script
	src="__PUBLIC__/vendors/mCustomScrollbar/jquery.mCustomScrollbar.min.js"></script>
<script src="__PUBLIC__/vendors/jquery-nestable/jquery.nestable.js"></script>
<script src="__PUBLIC__/vendors/select2/select2.min.js"></script>
<script
	src="__PUBLIC__/vendors/bootstrap-select/bootstrap-select.min.js"></script>
<script src="__PUBLIC__/vendors/multi-select/js/jquery.multi-select.js"></script>
<script src="__PUBLIC__/vendors/suggest/bootstrap-suggest.min.js"></script>
<script src="__PUBLIC__/vendors/My97DatePicker/WdatePicker.js"></script>
<script src="__PUBLIC__/vendors/clockpicker/clockpicker.js"></script>
<script src="__PUBLIC__/vendors/treeview/jquery.treeview.js"></script>
<script src="__PUBLIC__/vendors/treeview/jquery.treeview.edit.js"></script>
<script
	src="__PUBLIC__/vendors/bootstrap-progressbar/bootstrap-progressbar.min.js"></script>
<!-- 统计图表 -->
<script src="__PUBLIC__/vendors/intro.js/intro.js"></script>
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.js"></script>
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.categories.js"></script>
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.pie.js"></script>
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.tooltip.js"></script>
<!-- <script src="__PUBLIC__/vendors/flot-chart/jquery.flot.resize.js"></script> -->
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.fillbetween.js"></script>
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.stack.js"></script>
<script src="__PUBLIC__/vendors/flot-chart/jquery.flot.spline.js"></script>


<script src="__PUBLIC__/vendors/calendar/zabuto_calendar.min.js"></script>
<script src="__PUBLIC__/vendors/sco.message/sco.message.js"></script>
<script src="__PUBLIC__/vendors/intro.js/intro.js"></script>
<script
	src="__PUBLIC__/vendors/bootstrap-switch/js/bootstrap-switch.min.js"></script>

<!-- <script src="__PUBLIC__/vendors/bootstrap-table/src/bootstrap-table.js"></script>
<script src="__PUBLIC__/vendors/bootstrap-table/src/extensions/editable/bootstrap-table-editable.js"></script>
<script src="__PUBLIC__/vendors/bootstrap3-editable/js/bootstrap-editable.js"></script>
<script src="__PUBLIC__/vendors/bootstrap-table/src/extensions/resizable/bootstrap-table-resizable.js"></script>
<script src="__PUBLIC__/vendors/colResizable-1.5/colResizable-1.5.min.js"></script>  
<script src="__PUBLIC__/vendors/dragtable/jquery.dragtable.js"></script>
<script src="__PUBLIC__/vendors/bootstrap-table/src/extensions/reorder-columns/bootstrap-table-reorder-columns.js"></script>
<script src="__PUBLIC__/vendors/bootstrap-table/src/locale/bootstrap-table-zh-CN.js"></script>
<script src="__PUBLIC__/vendors/jquery.stickytableheaders.min.js"></script>
 -->
<script
	src="__PUBLIC__/vendors/jquery-tablesorter/jquery.tablesorter.js"></script>
<script src="__PUBLIC__/vendors/jqgrid/jquery.jqGrid.js"></script>
<script src="__PUBLIC__/vendors/jqgrid/i18n/grid.locale-cn.js"></script>

<script
	src="__PUBLIC__/vendors/DataTables/media/js/jquery.dataTables.js"></script>
<script
	src="__PUBLIC__/vendors/DataTables/media/js/dataTables.bootstrap.js"></script>
<script src="__PUBLIC__/vendors/DataTables/jquery.jeditable.js"></script>

<!--script src="__PUBLIC__/js/nocpanel.js"></script-->

<script
	src="__PUBLIC__/vendors/DataTables/media/js/jquery.dataTables.js"></script>
<script
	src="__PUBLIC__/vendors/DataTables/media/js/dataTables.bootstrap.js"></script>
<script src="__PUBLIC__/vendors/DataTables/jquery.jeditable.js"></script>

<!--CORE JAVASCRIPT-->
<script src="__PUBLIC__/js/main.js"></script>
<!--LOADING SCRIPTS FOR PAGE-->
<script type="text/javascript">
	var _root_path="__ROOT__";
	var _public_path="__PUBLIC__";
    var _my_exten = "{$Think.session.exten}";
    function edit_myself(){
        $.get('{:U('user/edit')}&who=1'+'&id={$Think.session.role_id}&t=' + Math.random(1000), '', function(data){  
            parent.layer.open({
                type: 1,
                //skin: 'layui-layer-rim', //加上边框
                area: ['600px', '560px'], //宽高
                title: '编辑',
                shadeClose:true, //点击遮罩层 关闭
                content: data
            });
        }) 

    }

//wangchao  2016-5-13

$(function(){
    $('#phonebox').keydown(function(event){ 
        if(event.keyCode==13){ 
            $("#callout").click(); 
        }
    });
    $('#phonebox').focus(function(){
        $('.page-topsec-inputbox').css('border','1px solid #468847');
        $('#callout').css('color','#468847');
        //绑定键盘回车事件
         
    });
    $('#phonebox').blur(function(){
        $('.page-topsec-inputbox').css('border','1px solid #d8e3ef');
        $('#callout').css('color','grey');
        $(document).keydown(function(event){ 
            if(event.keyCode==13){ 
                return false; 
            }
        }); 
    });
    $('#callout').click(function(){
        dial($('#phonebox').val(),'','');      
    });


     $('#btn-dnd').on('switch-change', function (e, data) {
        if(data.value){
            setDND(1);
        }else{
            setDND(0); 
        }
    });

     $("#menu_{$page_action_code}").attr("class","active")
     $(".nav-second-level .active").parent().closest("li").attr("class","active");
     $(".nav-second-level .active").parent().attr('aria-expanded','true');

     //定时执行函数，查询最新消息
     
     //setInterval("getThreeMessages()",3600);
     //getThreeMessages();

     $('.fasong').click(function(){
         CloseNoc();
         $.get('{:U("message/add")}'+'&t=' + Math.random(1000), '', function(data){  
           parent.layer.open({
             type: 1,
             area: ['420px', '400px'],
             title: '发送消息',
             shadeClose:true,
             content: data
           });
         }) 
     })
})

</script>
<style type="text/css">
body {
	font-family: Arial, "Hiragino Sans GB", "微软雅黑", "黑体-简", Helvetica,
		sans-serif;
	font-size: 13px;
	line-height: 1.42857143;
	color: #777777;
	background-color: #f0f2f5;
}
</style>
</head>
<body>
	<div>

		<!--BEGIN BACK TO TOP-->
		<a id="totop" href="javascript:void()"><i class="fa fa-angle-up"></i></a>
		<!--END BACK TO TOP-->
		<!--BEGIN TOPBAR-->
		<div id="header-topbar-option-demo" class="page-header-topbar">
			<nav id="topbar" role="navigation"
				style="margin-bottom: 0; z-index: 2;"
				class="navbar navbar-default navbar-static-top">
				<div class="navbar-header">
					<button type="button" data-toggle="collapse"
						data-target=".sidebar-collapse" class="navbar-toggle">
						<span class="sr-only">触发导航</span><span class="icon-bar"></span><span
							class="icon-bar"></span><span class="icon-bar"></span>
					</button>
					<a id="logo" href="__APP__?m=index" class="navbar-brand"><span
						class="fa fa-rocket"></span><span class="logo-text">{:C('defaultinfo.name')}</span><span
						style="display: none" class="logo-text-icon">S</span></a>
				</div>
				<div class="topbar-main" style="background: #FFF">
					<a id="menu-toggle" href="javascript:void()" class="hidden-xs"><i
						class="fa fa-bars text-primary"></i></a> <span
						class="col-sm-2 navbar-brand" id="page_title">{$page_title}
					</span>
					<if condition="$Think.session.exten gt 0">
					<div class="page-topsec-area">
						<div class="page-topsec-inputbox">
							<input id="phonebox" type="text" placeholder="点击拨号"> <a
								id="callout" href="javascript:;" class="fa fa-phone"></a>
						</div>
					</div>
					</if>

					<ul class="nav navbar navbar-top-links navbar-right mbn">

						<if condition="$Think.session.exten gt 0">
						<li class="dropdown"><a data-hover="dropdown"
							href="javascript:void()" class="dropdown-toggle"
							id="a_exten_state"><i class="fa fa-circle fa-fw idle"
								id="exten_state_fa" title=""></i> <span id="exten_state_text"
								style="color: #777777"></span></a>
							<ul class="dropdown-menu dropdown-alerts">
								<li
									style="background: #33485c; color: #FFF; padding: 10px 15px; margin-bottom: 0;"><div
										style="float: left; padding-top: 3px;">通话流水</div>
									<div id="btn-dnd" style="float: right;">
										<div data-off="success" data-on="danger"
											class="make-switch switch-left switch-small"
											data-off-label="就绪" data-on-label="免打扰"
											data  -placement="top" class="btn btn-default mbs">
											<input type="checkbox" checked="checked" class="switch " />
										</div>
									</div></li>
								<li>
									<div class="dropdown-slimscroll11" id="div_phone_list">
										<ul>
											<!--                                         <li><a href="extra-user-list.html" target="_blank"><span
                                                class="label label-success"><i class="fa fa-arrow-down"></i></span>18500020086<span
                                                class="pull-right text-muted small">4 分钟前</span></a></li>
                                        <li><a href="extra-user-list.html" target="_blank"><span
                                                class="label label-info"><i class="fa fa-arrow-up"></i></span>18500020086<span class="pull-right text-muted small">12 分钟前</span></a>
                                        </li> -->

										</ul>
									</div>
								</li>
								<li class="last"><a
									href="javascript:loadPage('通话流水','index.php?m=cdr&a=index','0')"
									target="_blank">查看全部</a></li>

							</ul></li>
						</if>
						<li class=" dropdown openmessagebox" style="cursor: pointer;"><a
							data-hover="dropdown" class="dropdown-toggle"><i
								class="fa fa-comment text-primary"></i><span id="message_count"
								class="badge badge-info"></span></a></li>

						<li class="dropdown topbar-user"><a data-hover="dropdown"
							href="javascript:void()" class="dropdown-toggle"><img
								src="__PUBLIC__/face/{$Think.session.user_img}" alt=""
								class="img-responsive img-circle" />&nbsp;<span
								class="hidden-xs" style="color: #777777">{$Think.session.real_name}</span>&nbsp;
								<if condition="$Think.session.exten gt 0">(
								{$Think.session.exten} 分机 )</if><span class="caret"></span></a>
							<ul class="dropdown-menu dropdown-user pull-right">
								<li><a href="javascript:edit_myself()"><i
										class="fa fa-user"></i>&nbsp;个人资料</a></li>

								<li><a href="__APP__?m=user&a=logout"><i
										class="fa fa-key"></i>&nbsp;退出</a></li>
							</ul></li>

						<li class="dropdown hidden-xs">
							<!--BEGIN THEME SETTING--> <a id="theme-setting"
							style="background: #FFF" href="javascript:;"
							data-hover="dropdown" data-step="1"
							data-intro="&lt;b&gt;Header&lt;/b&gt;, &lt;b&gt;sidebar&lt;/b&gt;, &lt;b&gt;border style&lt;/b&gt; and &lt;b&gt;color&lt;/b&gt;, all of them can change for you to create the best"
							data-position="left" class="dropdown-toggle"><i
								class="fa fa-cogs text-primary"></i></a>
							<ul class="dropdown-menu dropdown-theme-setting pull-right">
								<li><h4 class="mtn">皮肤样式</h4>
									<select id="list-style" class="form-control">
										<option value="style1">平面化方脚</option>
										<option value="style2">平面化圆脚</option>
								</select></li>
								<!-- <li><h4 class="mtn">Menu Styles</h4><select id="list-menu" class="form-control">
                                <option value="sidebar-default">Menu style 1</option>
                                <option value="sidebar-colors">Menu style 2</option>
                                <option value="sidebar-icons">Menu style 3</option>
                                <option value="sidebar-collapsed">Menu style 4</option>
                            </select></li> -->
								<!-- <li><h4 class="mtn">头样式</h4><select id="list-header" class="form-control">
                                <option value="header-static">不固定头部</option>
                                <option value="header-fixed">固定头部</option>
                            </select></li> -->
								<li><h4 class="mtn">皮肤选择</h4>
									<ul id="list-color" class="list-unstyled list-inline">
										<li data-color="green-dark" data-hover="tooltip"
											title="Green - Dark" class="green-dark"></li>
										<li data-color="red-dark" data-hover="tooltip"
											title="Red - Dark" class="red-dark"></li>
										<li data-color="pink-dark" data-hover="tooltip"
											title="Pink - Dark" class="pink-dark"></li>
										<li data-color="blue-dark" data-hover="tooltip"
											title="Blue - Dark" class="blue-dark"></li>
										<li data-color="yellow-dark" data-hover="tooltip"
											title="Yellow - Dark" class="yellow-dark"></li>
										<li data-color="green-grey" data-hover="tooltip"
											title="Green - Grey" class="green-grey"></li>
										<li data-color="red-grey" data-hover="tooltip"
											title="Red - Grey" class="red-grey"></li>
										<li data-color="pink-grey" data-hover="tooltip"
											title="Pink - Grey" class="pink-grey"></li>
										<li data-color="blue-grey" data-hover="tooltip"
											title="Blue - Grey" class="blue-grey"></li>
										<li data-color="yellow-grey" data-hover="tooltip"
											title="Yellow - Grey" class="yellow-grey"></li>
										<li data-color="yellow-green" data-hover="tooltip"
											title="Yellow - Green" class="yellow-green"></li>
										<li data-color="orange-grey" data-hover="tooltip"
											title="Orange - Grey" class="orange-grey"></li>
										<li data-color="pink-blue" data-hover="tooltip"
											title="Pink - Blue" class="pink-blue"></li>
										<li data-color="pink-violet" data-hover="tooltip"
											title="Pink - Violet" class="pink-violet active"></li>
										<li data-color="orange-violet" data-hover="tooltip"
											title="Orange - Violet" class="orange-violet"></li>
										<li data-color="pink-green" data-hover="tooltip"
											title="Pink - Green" class="pink-green"></li>
										<li data-color="pink-brown" data-hover="tooltip"
											title="Pink - Brown" class="pink-brown"></li>
										<li data-color="orange-blue" data-hover="tooltip"
											title="Orange - Blue" class="orange-blue"></li>
										<li data-color="yellow-blue" data-hover="tooltip"
											title="Yellow - Blue" class="yellow-blue"></li>
										<li data-color="green-blue" data-hover="tooltip"
											title="Green - Blue" class="green-blue"></li>
									</ul></li>
							</ul> <!--END THEME SETTING-->
						</li>
					</ul>
				</div>

			</nav>
		</div>
		<!--END TOPBAR-->
		<div id="wrapper">
			<!--BEGIN 右侧菜单-->
			<include file="Public/menu" />
			<!--END 右侧菜单-->

			<div id="info-panel" class="fixed">
				<div class="panel-inner"></div>
			</div>

			<!-- 消息弹出框 BEGIN-->
			<div id="new_noc_panel">
				<div id="new_noc_title">
					<span class="noc_iterm_num">共&nbsp;<span></span>&nbsp;条未读消息
						&nbsp;&nbsp;&nbsp; <a href="javascript:;" onClick="noc_list();"
						hidefocus="hidefocus">历史消息</a>&nbsp;&nbsp;&nbsp; <a
						style="cursor: pointer;" class="fasong"> 发消息</a></span> <span
						class="noc_iterm_close"></span>
				</div>
				<div id="nocbox_tips"></div>
				<div id="new_noc_list"></div>
				<div class="button">
					<a id="ViewAllNoc" class="btn-white-big" href="javascript:;"
						hidefocus="hidefocus">我都知道了</a>&nbsp;&nbsp;
				</div>
			</div>
			<!--  弹出框 END -->
			<!--BEGIN PAGE WRAPPER-->
			<div id="page-wrapper">
				<!--BEGIN CONTENT-->
				<div class="page-content" id="nanyou-page-content">
</if>
